﻿using MineMES.Domain.Entity;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MineMES.Domain.Entity
{
    [Table("Sys_User")]
    public class Sys_User : BaseEntity
    {
        public Sys_User()
        {
            
        }

        //暂时先用贫血型领域
        //private readonly IAbpDapperRepository<Users> _DapperRepository;//Dapper

        //public Users(IRepository<Users> repository)
        //{
        //    this._repository = repository;
        //}

        /// <summary>
        /// 用户工号
        /// </summary>
        [MaxLength(100)]
        public string UserNo { get; set; }
        /// <summary>
        /// 用户姓名
        /// </summary>
        [MaxLength(100)]
        public string UserName { get; set; }
        /// <summary>
        /// 归属部门
        /// </summary>
        [MaxLength(100)]
        public string DependDepartNo { get; set; }
        /// <summary>
        /// 用户密码
        /// </summary>
        [MaxLength(100)]
        public string Password { get; set; }
        /// <summary>
        /// 密钥
        /// </summary>
        public string Key { get; set; }

        /// <summary>
        /// 用户地址
        /// </summary>
        [MaxLength(100)]
        public string Address { get; set; }

        //todo..

        //暂时先用贫血型领域
        //public bool GetInfo(string id)
        //{
        //    var user= _repository.GetAsync(x => x.Id.ToString() == id).Result;
        //    if (user != null)
        //        return true;
        //    else
        //        return false;
        //}
    }
}
